/PROG  T2D_T1P
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "T2 DR -> T1 PK";
PROG_SIZE	= 2250;
CREATE		= DATE 12-05-30  TIME 18:10:46;
MODIFIED	= DATE 15-05-26  TIME 14:31:10;
FILE_NAME	= T2D_T1P;
VERSION		= 0;
LINE_COUNT	= 55;
MEMORY_SIZE	= 2662;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:   ;
   2:  LBL[10] ;
   3:  UFRAME_NUM=0 ;
   4:  UTOOL_NUM=1 ;
   5:  IF DI[14:ATC UNCHUCK OK]=ON OR DI[25:TOOL #1]=OFF,JMP LBL[90] ;
   6:  TIMER[10]=RESET ;
   7:  TIMER[10]=START ;
   8:J P[17:CLEAR] 10% CNT100    ;
   9:J P[18:CLEAR] 20% CNT100    ;
  10:   ;
  11:L P[4:APPROACH] 100mm/sec CNT50 ACC70    ;
  12:  WAIT DI[26:TOOL #2]=OFF    ;
  13:L P[5:APPROACH] 300mm/sec CNT50    ;
  14:L P[6:APPROACH] 300mm/sec FINE    ;
  15:L P[7:DROP] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  16:  DO[13:REQ ATC CHUCK]=OFF ;
  17:  DO[14:REQ ATC UNCHUCK]=ON ;
  18:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  19:  WAIT   1.00(sec) ;
  20:  DO[14:REQ ATC UNCHUCK]=OFF ;
  21:L P[8:APPROACH] 100mm/sec CNT50 ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  22:  WAIT DI[26:TOOL #2]=ON    ;
  23:L P[9:APPROACH] 300mm/sec CNT50    ;
  24:L P[10:APPROACH] 300mm/sec CNT50    ;
  25:L P[3:CLEAR] 200mm/sec CNT50 ACC70    ;
  26:J P[2:CLEAR] 20% CNT100    ;
  27:   ;
  28:J P[1:CLEAR] 20% CNT50    ;
  29:L P[11:APPROACH] 100mm/sec CNT50 ACC70    ;
  30:  WAIT DI[25:TOOL #1]=ON    ;
  31:L P[12:APPROACH] 300mm/sec CNT50    ;
  32:L P[13:APPROACH] 300mm/sec FINE    ;
  33:  DO[13:REQ ATC CHUCK]=OFF ;
  34:  DO[14:REQ ATC UNCHUCK]=ON ;
  35:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  36:  WAIT    .50(sec) ;
  37:L P[14:PICK] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  38:  WAIT   1.00(sec) ;
  39:  DO[21:TOOL2 POS]=ON ;
  40:  DO[14:REQ ATC UNCHUCK]=OFF ;
  41:  DO[13:REQ ATC CHUCK]=ON ;
  42:  WAIT DI[13:ATC CHUCK OK]=ON    ;
  43:  WAIT   1.00(sec) ;
  44:L P[15:APPROACH] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  45:L P[16:APPROACH] 300mm/sec CNT50    ;
  46:L P[11:APPROACH] 300mm/sec CNT50    ;
  47:L P[1:CLEAR] 200mm/sec CNT50 ACC70    ;
  48:   ;
  49:  MOVE TO HOME    ;
  50:  TIMER[10]=STOP ;
  51:   ;
  52:  END ;
  53:   ;
  54:  LBL[90] ;
  55:  MESSAGE[ERROR: T2 DETECT OR NOT] ;
/POS
P[1:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3091.776  mm,	Y =  1001.602  mm,	Z =  -484.864  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =    93.177 deg,
	E1=    15.275 deg
};
P[2:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1863.831  mm,	Y =     -.007  mm,	Z =  -484.864  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[3:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3150.158  mm,	Y = -1056.328  mm,	Z =  -484.865  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =   -90.603 deg,
	E1=    15.275 deg
};
P[4:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.822  mm,	Y =  -742.561  mm,	Z = -1209.220  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =   -90.000 deg,
	E1=    15.275 deg
};
P[5:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3231.369  mm,	Y =  -694.000  mm,	Z = -1374.000  mm,
	W =   179.621 deg,	P =    89.668 deg,	R =   -90.379 deg,
	E1=    15.275 deg
};
P[6:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3229.319  mm,	Y =  -482.063  mm,	Z = -1374.956  mm,
	W =   179.541 deg,	P =    89.575 deg,	R =   -90.460 deg,
	E1=    15.275 deg
};
P[7:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3229.318  mm,	Y =  -482.062  mm,	Z = -1443.355  mm,
	W =   179.535 deg,	P =    89.575 deg,	R =   -90.466 deg,
	E1=    15.275 deg
};
P[8:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,	
	J1=   -20.416 deg,	J2=   -15.553 deg,	J3=    69.118 deg,
	J4=   -82.027 deg,	J5=  -108.860 deg,	J6=   292.282 deg,
	E1=    15.275 deg
};
P[9:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3226.813  mm,	Y =  -627.997  mm,	Z = -1200.607  mm,
	W =   179.357 deg,	P =    89.587 deg,	R =   -90.645 deg,
	E1=    15.276 deg
};
P[10:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3226.813  mm,	Y =  -627.997  mm,	Z = -1067.647  mm,
	W =   179.356 deg,	P =    89.587 deg,	R =   -90.645 deg,
	E1=    15.276 deg
};
P[11:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.823  mm,	Y =   787.680  mm,	Z = -1045.378  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =    90.000 deg,
	E1=    15.275 deg
};
P[12:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.301  mm,	Y =   738.603  mm,	Z = -1283.466  mm,
	W =  -179.598 deg,	P =    89.667 deg,	R =    90.402 deg,
	E1=    15.275 deg
};
P[13:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3231.088  mm,	Y =   673.311  mm,	Z = -1440.661  mm,
	W =   112.652 deg,	P =    89.669 deg,	R =    22.654 deg,
	E1=    15.275 deg
};
P[14:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.185  mm,	Y =   511.668  mm,	Z = -1441.256  mm,
	W =   147.875 deg,	P =    89.451 deg,	R =    58.302 deg,
	E1=    14.800 deg
};
P[15:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.182  mm,	Y =   511.668  mm,	Z = -1371.177  mm,
	W =   147.875 deg,	P =    89.451 deg,	R =    58.302 deg,
	E1=    14.800 deg
};
P[16:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3231.123  mm,	Y =   670.774  mm,	Z = -1372.558  mm,
	W =   112.605 deg,	P =    89.668 deg,	R =    22.606 deg,
	E1=    15.276 deg
};
P[17:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1863.831  mm,	Y =     -.007  mm,	Z =  -484.864  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[18:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3088.719  mm,	Y = -1056.328  mm,	Z =  -484.865  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =   -90.603 deg,
	E1=    15.275 deg
};
/END
